package com.ruoyi.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.BankAccountMapper;
import com.ruoyi.erp.domain.BankAccount;
import com.ruoyi.erp.service.IBankAccountService;
import com.ruoyi.common.core.text.Convert;

/**
 * 银行账户Service业务层处理
 * 
 * @author sauger
 * @date 2022-04-01
 */
@Service
public class BankAccountServiceImpl implements IBankAccountService 
{
    @Autowired
    private BankAccountMapper bankAccountMapper;

    /**
     * 查询银行账户
     * 
     * @param id 银行账户主键
     * @return 银行账户
     */
    @Override
    public BankAccount selectBankAccountById(Integer id)
    {
        return bankAccountMapper.selectBankAccountById(id);
    }

    /**
     * 查询银行账户列表
     * 
     * @param bankAccount 银行账户
     * @return 银行账户
     */
    @Override
    public List<BankAccount> selectBankAccountList(BankAccount bankAccount)
    {
        return bankAccountMapper.selectBankAccountList(bankAccount);
    }

    /**
     * 新增银行账户
     * 
     * @param bankAccount 银行账户
     * @return 结果
     */
    @Override
    public int insertBankAccount(BankAccount bankAccount)
    {
        return bankAccountMapper.insertBankAccount(bankAccount);
    }

    /**
     * 修改银行账户
     * 
     * @param bankAccount 银行账户
     * @return 结果
     */
    @Override
    public int updateBankAccount(BankAccount bankAccount)
    {
        return bankAccountMapper.updateBankAccount(bankAccount);
    }

    /**
     * 批量删除银行账户
     * 
     * @param ids 需要删除的银行账户主键
     * @return 结果
     */
    @Override
    public int deleteBankAccountByIds(String ids)
    {
        return bankAccountMapper.deleteBankAccountByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除银行账户信息
     * 
     * @param id 银行账户主键
     * @return 结果
     */
    @Override
    public int deleteBankAccountById(Integer id)
    {
        return bankAccountMapper.deleteBankAccountById(id);
    }
}
